package model

import "errors"

var ErrNotFound = errors.New("Rows selectd is zero")
var ErrNotUpdated = errors.New("Rows affected by update is zero")
var ErrNotDeleted = errors.New("Rows affected by delete is zero")

var IsConstraintError = errors.New("Constraint failed")
var IsValidationError = errors.New("Validation failed")
var IsNotSingular = errors.New("Name is not singular")

type ForumExtra struct {
	Media       []*ForumAttachmentRelationship `json:"attachments"`
	DelMetaIds  []uint64                       `json:"delMetaIds"`
	DelMediaIds []uint64                       `json:"delMediaIds"`
	Logs        []*ForumPostModerationLog      `json:"logs"`
	TopicLogs   []*ForumTopicModerationLog     `json:"topicLogs"`
	Notices     []*ForumUserNotice             `json:"notices"`
}

type ForumPostRel struct {
	TagIds      []uint64                       `json:"tagIds"`
	Meta        []*ForumPostMetum              `json:"meta"`
	DelMetaIds  []uint64                       `json:"delMetaIds"`
	Media       []*ForumAttachmentRelationship `json:"media"`
	DelMediaIds []uint64                       `json:"delMediaIds"`
	Feed        *ForumFeed                     `json:"feed"`
	Logs        []*ForumPostModerationLog      `json:"logs"`
	Notices     []*ForumUserNotice             `json:"notices"`
	Term        []*ForumTermRelationship       `json:"term"`
	DelTermIds  []uint64                       `json:"delTermIds"`
	Card        []*ForumPostCard               `json:"cards"`
	DelCardIds  []uint64                       `json:"delCardIds"`
	Blacklist   []string                       `json:"blacklist"`
}

type ForumTopicRel struct {
	Meta        []*ForumTopicMetum             `json:"meta"`
	DelMetaIds  []uint64                       `json:"delMetaIds"`
	Media       []*ForumAttachmentRelationship `json:"media"`
	DelMediaIds []uint64                       `json:"delMediaIds"`
	Feed        *ForumFeed                     `json:"feed"`
	Post        *ForumPost                     `json:"post"`
	Logs        []*ForumTopicModerationLog     `json:"logs"`
	Notices     []*ForumUserNotice             `json:"notices"`
}

type ForumReactionRel struct {
	Meta        []*ForumReactionMetum          `json:"meta"`
	DelMetaIds  []uint64                       `json:"delMetaIds"`
	Media       []*ForumAttachmentRelationship `json:"media"`
	DelMediaIds []uint64                       `json:"delMediaIds"`
	Feed        *ForumFeed                     `json:"feed"`
}

type ForumTermRel struct {
	Meta        []*ForumTermMetum              `json:"meta"`
	DelMetaIds  []uint64                       `json:"delMetaIds"`
	Media       []*ForumAttachmentRelationship `json:"media"`
	DelMediaIds []uint64                       `json:"delMediaIds"`
	Blacklist   []string                       `json:"blacklist"`
}

type ForumUserRel struct {
	Media       []*ForumAttachmentRelationship `json:"media"`
	DelMediaIds []uint64                       `json:"delMediaIds"`
}
